# -*- coding: utf-8 -*-
"""
@Time ： 2021/11/25 20:29
@Auth ： Mr. William 1052949192
@Company ：特斯汀学院 @testingedu.com.cn
@Function ：关联
"""

relations = {'text': '202111252003539605'}


def func(a, b):
    global relations
    for key in relations.keys():
        k = '{' + str(key) + '}'
        a = a.replace(k, relations.get(key))
        b = b.replace(k, relations.get(key))

    print(a)
    print(b)


# 需求：如果参数字符串里面有{text}，我们就把{text}替换为字典里面text键的值
func('abc', '{text}')
